/**
 * 
 */
package ai.ann;


/** 
 * @author Object
 * @proyect MyFirstNeuronalNetwork
 * @package neuronalNetwork
 */
public class SigmoidLayerDirect extends LayerDirect {

	/**
	 * 
	 */
	public SigmoidLayerDirect() {
	}

	/**
	 * @param rows
	 */
	public SigmoidLayerDirect(int rows) {
		super(rows);
	}

	public double[] stimulation(double[] patterns) {
		int x = 0;
        double in;
        for ( x = 0; x < rows; x++) {
            in = patterns[x] + weightMatrixs[x][0];
            outMatrixs[x] = 1 / (1 + Math.exp(-in));
        }
        if(output ==  null){
        	return outMatrixs;
        } else {
        	return getOutput().stimulation(getOutMatrix());
		}
	}

}
